Skip to content

fix: an outside agent's message that never ran no longer reaches a later agent - #997

Merged
badcuban merged 2 commits into
mainfrom
fix/outside-agent-not-sent
Nov 18, 2026
Merged

badcuban merged 2 commits into
mainfrom
fix/outside-agent-not-sent

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

When an outside agent's message was accepted but never reached the agent, it stayed in the chat looking like a normal message. That happened when the access check refused it at the last moment, its start failed, Stop landed while it was being prepared, or a restart cut it off while starting. Hand-off history, a fork's context and a room's catch-up note then gave its text to later agents, which can run with more access than the outside agent was allowed.

Now every one of those paths marks the message "not sent", so no history carries it:

  • The reactor sends one server-only command for a message nobody can send again, thread.message.not-run (renamed from thread.lead-pass.not-run). A lead chat's pass keeps its note and line. An outside agent's message is marked with thread.continue-at-reset-skipped, an event every client already reads as "never reached the agent", so no released client meets a new event or value.
  • The mark lands before the failure is reported, so an agent waiting on the thread already sees it.
  • A restart marks an outside message it finds still starting before it settles the session.
  • ProviderService.sendTurn no longer fails after the provider took the turn. A failed bookkeeping write there used to make a running turn read as one that never started.
  • The chat shows "Not sent" under the message. The outside agent's thread_wait answers taken_back, and thread_read labels it.

Known gap: Claude reports a turn started a moment before its prompt is queued and written to the program. A restart in that window leaves the message unmarked.

…ter agent

When an outside agent's turn was accepted but never reached the agent (the
reactor's last ceiling check refused it, its start failed before the
provider took it, Stop landed while it was prepared, or a restart cut it
off while starting), the message stayed in the chat unmarked. Hand-off
seeds, fork context and room catch-up notes then gave its text to later
agents, possibly ones with more access.

The reactor now sends one server-only command for every message no one can
send again, `thread.message.not-run` (renamed from `thread.lead-pass.not-run`).
A pass keeps its note and line; an outside message is marked with
`thread.continue-at-reset-skipped`, which every client already reads as
"never reached the agent", so no client meets a new event. The mark lands
before the failure is reported. A restart's note marks an outside message
whose turn never began. The chat shows "Not sent" under it, and the outside
agent's thread_wait answers taken_back for it.
- A restart marks an outside message it finds still starting before it
  settles the session, in the reactor, not in the later restart-continue
  decision that lived only in memory: a startup that dies in between marks
  it again on the next one.
- ProviderService.sendTurn no longer fails after the provider took the
  turn: the bookkeeping after it (latency record, directory write,
  analytics) logs instead. A failure there made a running turn read as one
  that never started, and would have marked a message the agent read as
  not sent.
- Documents the remaining gap: a restart between Claude reporting a turn
  started and its prompt reaching the program.
@vercel

vercel Bot commented Nov 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 18, 2026 10:22pm UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 558bca8 Nov 18, 2026
24 checks passed
@badcuban
badcuban deleted the fix/outside-agent-not-sent branch November 18, 2026 22:49

This branch was previously deployed

1 inactive deployment
Preview — 523eca3d Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant